﻿using System;
using System.Text.RegularExpressions;

namespace LinkValidator
{
    public class Program
    {
        public static void Main()
        {
            string pattern = @"((www\.)|(https?://))[A-Za-z\._-]+\.[A-Za-z_-]{2,4}";
            string text = @"Enter www.google.com to start searching, or to fail - www.bing.com. " + 
                @"As of today, https://susi.uni-sofia.bg does not suck balls as much as it used to.";

            Match match = Regex.Match(text, pattern);
            while (match.Success)
            {
                Console.WriteLine(match.Value);
                match = match.NextMatch();
            }
        }
    }
}
